package springmvc.web.cocktails;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import lombok.Data;

import org.dhbw.cocktail.mixer.ICocktailMixer;
import org.dhbw.cocktail.mixer.MixerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

/**
 * to be implemented
 * @author Roland von Werden
 *
 */
@Data
public class EditCocktailController implements Controller {

	/**
	 * autowirde mixerfactory to access methods to create, get and search
	 * persisted Objects
	 */
	@Autowired
	@Qualifier("cocktail_mixer_factory")
	MixerFactory mixerFactory;
	ICocktailMixer mixer;

	@Override
	public ModelAndView handleRequest(HttpServletRequest arg0,
			HttpServletResponse arg1) throws Exception {
		mixer = mixerFactory.getCocktailMixer();
		//HttpSession session = arg0.getSession();
		

		// TODO Auto-generated method stub
		return null;
	}

	@SuppressWarnings("unused")
	private ModelAndView saveCocktail() {
		ModelAndView mav = new ModelAndView();

		return mav;
	}

}
